import pygame, sys,win32api,win32con,win32gui
import re
import sys
import os
import itertools
import math
from tkinter import *
from pygame.locals import *
from Stand_alone_version import *
#from player2 import *
from _thread import *
def make_mode():

    WINDOWWIDTH = 1400
    WINDOWHEIGHT = 800
    keep_going = True
    pygame.init()
    window = pygame.display.set_mode((WINDOWWIDTH,WINDOWHEIGHT))
    cuti2 = pygame.font.Font('C:\Windows\Fonts\STHUPO.TTF', 50)
    cuti = pygame.font.Font('C:\Windows\Fonts\ARLRDBD.TTF', 55)
    jianti = pygame.font.Font('C:\Windows\Fonts\STXINGKA.TTF', 55)
    weiruan = pygame.font.Font('C:\Windows\Fonts\STXINWEI.TTF', 55)
    pygame.display.set_caption('测试')
    radius = 20
    while keep_going:
        for event in pygame.event.get():  # 遍历事件
            if event.type == pygame.QUIT:  # 退出事件
                keep_going = False
            # elif event.type == MOUSEBUTTONUP:
            #     x,y = event.pos
            #     if 600 < x < 820 and 250 < y < 310 :
            #         main()
            #     elif 600 < x < 820 and 350 < y < 410:
            #         main()
            #     elif 600 < x < 820 and 450 < y < 510:
            #         return 1
        if keep_going == False:
            pygame.quit()
            sys.exit()     
        
        #pygame.draw.circle(window,(255,0,0),(200,300),radius)
        pygame.display.update()
        window.fill((255,228,181))
        nuMber = pygame.font.Font(None, 30)
        pygame.draw.rect(window, (0,191,255), [600, 250, 220, 60], 3)
        pygame.draw.rect(window, (0,191,255), [600, 350, 220, 60], 3)
        pygame.draw.rect(window, (0,191,255), [600, 450, 220, 60], 3)
        window.blit(jianti.render("单机模式", True, (0,0,0)), (600,250))
        window.blit(jianti.render("网络模式", True, (0,0,0)), (600,350))
        window.blit(weiruan.render(" A  I", True, (0,0,0)), (600,450))
        window.blit(jianti.render("模式", True, (0,0,0)), (713,447))
        
    
make_mode()
pygame.quit()